package com.oocl.oopdemo.fiveday;

public class HashcodeDemo {

	public static void main(String[] args) {
		Object o1=new Object();
		Object o2=o1;
		Object o3=new Object();
		System.out.println(o1.hashCode()==o2.hashCode());
		System.out.println(o1.hashCode()==o3.hashCode());
		O oo1=new O();
		O oo2=new O();
		System.out.println(oo1==oo2);
	}
}
class O{
	@Override
	public boolean equals(Object obj) {
		return false;
		
	}
	
	@Override
	public int hashCode(){
		return 1;
	}
}